#ifndef __TIMER_H
#define __TIMER_H

#include "main.h"

typedef enum{
	TIMER0=0,
	TIMER1=1
}Timer_TypeDef;
typedef enum{
	MODE_CHAIN=0,
	MODE_NOCHAIN=1
}Mode_TypeDef;
typedef enum{
	CH0=0,
	CH1=1,
	CH2=2,
	CH3=3,
	CH4=4,
	CH5=5
}Channel_TypeDef;

/*Prototype function*/
void PIT_InitTimer(void);
void PIT_ConfigValue(Timer_TypeDef Timer, uint16_t Value);
void PIT_EnableIRQ(Timer_TypeDef Timer, Mode_TypeDef Mode);
uint8_t PIT_GetFlag(Timer_TypeDef Timer);
void PIT_ClearFlag(Timer_TypeDef Timer);

void TPM0_Init(void);
void TPM0_EPWMDuty(Channel_TypeDef Channel,uint8_t Duty);

#endif
